home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEpointLightTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.1 KB  |  169 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //
  20. //  Creation Date:    May 9, 1997
  21. //  Author:        sw
  22. //
  23. //  Procedure Name:
  24. //    AEpointLightTemplate
  25. //
  26. //  Description:
  27. //    Creates the attribute editor controls for the pointLightNode
  28. //
  29. //  Input Value:
  30. //    nodeName
  31. //
  32. //  Output Value:
  33. //    None
  34. //
  35.  
  36.  
  37.  
  38. global proc AEpointLightFogNew (string $fogGeometry)
  39. //
  40. // Description:
  41. //        Setup up button that makes fog.
  42. //
  43. {
  44.     setUITemplate -pst attributeEditorTemplate;
  45.  
  46.     attrNavigationControlGrp -l "Light Fog"
  47.         -at $fogGeometry
  48.         -ignoreNotSupported
  49.         lightFogControl;
  50.  
  51.     setUITemplate -ppt;
  52. }
  53.  
  54. global proc AEpointLightFogReplace (string $fogGeometry)
  55. //
  56. // Description:
  57. //        Replace the button with the command to create fog
  58. //        for the new light.
  59. //
  60. {
  61.     attrNavigationControlGrp -edit
  62.         -at $fogGeometry
  63.         -ignoreNotSupported
  64.         lightFogControl;
  65. }
  66.  
  67.  
  68. //
  69. //  Procedure Name:
  70. //     AEpointLightGlowNew 
  71. //
  72. //
  73.  
  74. global proc AEpointLightGlowNew (string $lightGlow)
  75. {
  76.     setUITemplate -pst attributeEditorTemplate;
  77.  
  78.     attrNavigationControlGrp -l "Light Glow"
  79.         -at $lightGlow
  80.         -ignoreNotSupported
  81.         lightGlowControl;
  82.  
  83.     setUITemplate -ppt;
  84. }
  85.  
  86. //
  87. //  Procedure Name:
  88. //    AEpointLightGlowReplace
  89. //
  90. //
  91.  
  92. global proc AEpointLightGlowReplace (string $lightGlow)
  93. {
  94.     attrNavigationControlGrp -edit
  95.         -at $lightGlow
  96.         -ignoreNotSupported
  97.         lightGlowControl;
  98. }
  99.  
  100. //
  101. //  Procedure Name:
  102. //    AEpointLightTemplate
  103. //
  104. //
  105.  
  106. global proc AEpointLightTemplate ( string $nodeName )
  107. {
  108.     AEswatchDisplay $nodeName;
  109.  
  110. editorTemplate -beginScrollLayout;
  111.  
  112.     editorTemplate -beginLayout "Point Light Attributes" -collapse 0;
  113.         AElightCommon $nodeName;
  114.         AEnonAmbientLightShapeNodeDecay $nodeName;
  115.     editorTemplate -endLayout;
  116.  
  117.     editorTemplate -beginLayout "Light Effects";
  118.             editorTemplate -callCustom 
  119.                 "AEpointLightFogNew"         
  120.                 "AEpointLightFogReplace"
  121.                 "fogGeometry";
  122.             editorTemplate -addControl "fogType";
  123.             editorTemplate -addControl "fogRadius";
  124.             editorTemplate -addControl "fogIntensity";
  125.  
  126.             editorTemplate -addSeparator;
  127.             editorTemplate -callCustom 
  128.                 "AEpointLightGlowNew" 
  129.                 "AEpointLightGlowReplace" 
  130.                 "lightGlow";
  131.  
  132.             editorTemplate -suppress "fogGeometry";
  133.             editorTemplate -suppress "fogType";
  134.             editorTemplate -suppress "objectType";
  135.             editorTemplate -suppress "pointWorld";
  136.             editorTemplate -suppress "farPointWorld";
  137.             editorTemplate -suppress "lightGlow";
  138.             editorTemplate -suppress "farPointCamera";
  139.     editorTemplate -endLayout;
  140.  
  141.     editorTemplate -beginLayout "Shadows";
  142.         editorTemplate -addControl "shadowColor";
  143.  
  144.         // include the depth part of the nonExtendedLightShapeNode first
  145.         AEnonExtendedLightShapeDepthMapAttr $nodeName;
  146.  
  147.         AElightCommonShadow1 $nodeName;
  148.     
  149.         // include the main part of the nonExtendedLightShapeNode
  150.         AEnonExtendedLightShapeShadowAttr $nodeName;
  151.  
  152.         // include the last part of the lightNode
  153.         AElightCommonShadow2 $nodeName;
  154.     editorTemplate -endLayout;    
  155.  
  156.     // mental ray light attributes
  157.     if (`exists AEmentalrayPointLight`)
  158.         AEmentalrayPointLight $nodeName;
  159.  
  160.     // include all other inherited attrs
  161.     AEshapeTemplate $nodeName;
  162.  
  163.     //suppressed attributes
  164.     editorTemplate -suppress "receiveShadows";
  165.  
  166. editorTemplate -addExtraControls;
  167. editorTemplate -endScrollLayout;
  168. }
  169.